package cn.linjianhui.interview.patterns.singleton;

// 单例模式——静态内部类，类的静态内部类在JVM中是唯一
public class Singleton {
    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }

    private Singleton() {

    }

    public static final Singleton getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
